<%@ page language="java" import="com.ruohi.util.common.*" pageEncoding="UTF-8"%><%
	String tableName = "service_common_role";
	String fileds = "id,uuid,role_name";
	String whereStr = "";
	String orderByStr = " id desc ";
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title><%=Env.getInstance().getProperty("project_name") %></title>
	<link href="/plugin/ui/ligerUI/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
	<link href="/plugin/ui/ligerUI/ligerUI/skins/Gray/css/all.css" rel="stylesheet" type="text/css" />
	<link href="/plugin/ui/ligerUI/ligerUI/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
	<link href="/backend/style/style.css" rel="stylesheet" type="text/css" />
	<script src="/plugin/jquery/jquery.min.js" type="text/javascript"></script>
  </head>
  <body>
  	<div class="searchForm">
  		<div class="searchCondition">
	  		<div class="searchLeft">角色名称</div>
	  		<div class="searchRight">
	  			<input type="text" style="width: 150px;" name="role_name" class="jr_text" id="role_name" />
	  		</div>
  		</div>
  		<div class="searchBtn">
  			<input type="button" class="btn" onclick="doSearch();" value="查询" />
  			<input type="button" class="btn" onclick="doClearForm();" value="重置" />
  		</div>
  	</div>
  	<div style="clear: left;"></div>
	<div class="l-loading" style="display: block" id="pageloading"></div> 
	<div id="maingrid" style="margin: 0; padding: 0"></div>
	<div style="display: none;"></div>
  </body>
</html>
<script src="/plugin/ui/ligerUI/ligerUI/js/ligerui.min.js" type="text/javascript"></script>
<script src="/backend/scripts/common.js" type="text/javascript"></script>
<script type="text/javascript">
	var grid;
	var tableName = '<%=tableName %>';
	var fields = '<%=fileds %>';
	var channelUUID = '';
	var whereStr = '<%=whereStr %>';
	var orderBy = '<%=orderByStr %>';
	var columnsArr = [];
	var url = '';
	var conditionStr = '';
	var main = '';
	var windowWidth = 400;
	var windowHeight = 70;
	var params = [];
	jQuery(function() {
		grid = new Dev21sunGrid();
		jQuery("#pageloading").hide();
	});
	//列数组
	columnsArr =  [ 
		{ display : '角色名称', name : 'role_name', align : 'left' , type : 'string' , editor: { type: 'text' } , width : 200 , render : function(row){
				return "<a class='link' href='javascript:void(0);' onclick='addAndEdit("+row.__index+");'>"+row.role_name+"</a>";
			}
		} ,
		{ display : '权限设置', align : 'center' , type : 'string' , render : function(row){
				return "<a class='link' href='javascript:void(0);' onclick='setPower(\""+row.uuid+"\");'>权限设置</a>";
			}
		} 
	];
	
	function setPower(id){
		if(id!=undefined){
			jrWindow("/backend/common_role/common_power.jsp?id="+id,"权限设置",300,400);
		}
	}
	
	/*列表页条件查询*/
	function doSearch(){
		params = [];
		conditionStr = "";
		var role_name = jQuery("#role_name").val();
		if(''!=jQuery.trim(role_name)){
			conditionStr += " and role_name like '%"+role_name+"%' ";
		}
		params.push({'name':'tableName','value':tableName});
		params.push({'name':'fileds','value':fields});
		params.push({'name':'whereStr','value':conditionStr});
		params.push({'name':'orderBy','value':orderBy});
		grid.options.parms=params;
		grid.loadData();
	}
    
</script>